<?php
    include_once '../connection/databaseHandler.php';
    include_once '../connection/sessionHandler.php';
    $database = new DatabaseHandler();
    $session = new SessionHandler();

    include_once '../classes/cRegister.php';
    $thisPage = new Register($database,$session);

    //Mendapatkan semua informasi yang telah divalidasi di client-side
    $fullname = $_POST['fullname'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $birthdate = $_POST['birthdate'];
    $location = $_POST['location'];
    $img_location = "./res/img/default.jpg";
    $id_role = 2;
    $wall_role = 1;
    $join_date = date("Y-m-d");
    $showfb_role = $_POST['showfb_role'];

    $thisPage->execRegistration(
        $id_role,
        $username,
        $password,
        $fullname,
        $img_location,
        $birthdate,
        $join_date,
        $wall_role,
        $location
    );

?>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>

